package it.stessaro.lostcities.collection;

import it.stessaro.lostcities.collection.pile.ColorPile;

import java.util.Comparator;

public class ColorPileSortByValue implements Comparator<ColorPile>{

	@Override
	public int compare(ColorPile o1, ColorPile o2) {
		int w1 = o1.expr_weight();
		int w2 = o2.expr_weight();
		if (w1>w2) {
			return -1;
		}else if (w1<w2) {
			return 1;
		}else{
			return 0;
		}
	}

}
